package com.techstar.ats.codec.live.decoder;

import io.netty.buffer.ByteBuf;
import com.techstar.ats.codec.Decoder;
import com.techstar.ats.codec.StringCodec;
import com.techstar.ats.dxp.live.F07Depot;

public enum F07DepotDecoder implements Decoder<F07Depot> {
	INSTANCE;

	public F07Depot create() {
		return new F07Depot();
	}

	public void decode(ByteBuf buf, F07Depot value) {
		value.station = buf.readUnsignedShort();
		value.group = (new StringCodec(9)).get(buf);
		value.driver = (new StringCodec(13)).get(buf);
		F07DeoptInOutDecoder.INSTANCE.decode(buf, value.out);
		F07DeoptInOutDecoder.INSTANCE.decode(buf, value.in);
	}
}
